package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName: CategoryMapper
 * Package: com.sky.mapper
 * Description:
 *
 * @Author: Zhang Peiyuan
 * @Create: 2024-12-18-10:59
 * @Version: v1.0
 */
@Mapper
public interface CategoryMapper {

    @AutoFill(OperationType.INSERT)
    void sava(Category category);

    Page<Category> queryPage(Integer type, String name);
    @AutoFill(OperationType.UPDATE)
    void update(Category build);

    List<Category> selectListByType(@Param("type") Integer type);

    void deleteById(Long id);
}
